package jse.log;


import java.util.logging.Level;

/**
 * Created by ice on 15-1-5.
 */
public class JdkLoggerAdapter implements LogAdapter {

    public Log getLogger(Class<?> clazz) {
        return new JdkLogger(java.util.logging.Logger.getLogger(clazz.getName()));
    }

    public Log getLogger(String clazzName) {
        return new JdkLogger(java.util.logging.Logger.getLogger(clazzName));
    }


    public class JdkLogger implements Log {

        private java.util.logging.Logger logger;
        private String clazzName;

        JdkLogger(java.util.logging.Logger logger) {
            this.logger = logger;
        }
        public boolean isDebugEnabled() {
            return logger.isLoggable(Level.FINE);
        }


        public boolean isInfoEnabled() {
            return logger.isLoggable(Level.INFO);
        }


        public boolean isWarnEnabled() {
            return logger.isLoggable(Level.WARNING);
        }


        public boolean isErrorEnabled() {
            return logger.isLoggable(Level.SEVERE);
        }


		@Override
		public Log setTag(String tag) {
			// TODO Auto-generated method stub
			return null;
		}


		@Override
		public boolean isFatalEnabled() {
			// TODO Auto-generated method stub
			return false;
		}


		@Override
		public void fatal(Object message) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void fatalf(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void fatal(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void fatal(Object message, Throwable t) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void error(Object message) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void errorf(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void error(Object message, Throwable t) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void warn(Object message) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void warnf(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void warn(Object message, Throwable t) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void info(Object message) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void infof(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void info(Object message, Throwable t) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void debug(Object message) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void debugf(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void debug(Object message, Throwable t) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public boolean isTraceEnabled() {
			// TODO Auto-generated method stub
			return false;
		}


		@Override
		public void trace(Object message) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void tracef(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void trace(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}


		@Override
		public void trace(Object message, Throwable t) {
			// TODO Auto-generated method stub
			
		}
		@Override
		public void error(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}
		@Override
		public void warn(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}
		@Override
		public void info(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}
		@Override
		public void debug(String fmt, Object... args) {
			// TODO Auto-generated method stub
			
		}

    }

}
